package cn.com.coding.system.service.impl;

import cn.com.coding.common.utils.PageUtil;
import cn.com.coding.common.utils.Query;
import cn.com.coding.system.dao.SchoolNewsDao;
import cn.com.coding.system.domin.SchoolNewsEntity;
import cn.com.coding.system.service.SchoolNewsService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("schoolNewsService")
public class SchoolNewsServiceImpl extends ServiceImpl<SchoolNewsDao, SchoolNewsEntity> implements SchoolNewsService {

    @Override
    public PageUtil queryPage(Map<String, Object> params) {
        IPage<SchoolNewsEntity> page = this.page(
                new Query<SchoolNewsEntity>().getPage(params),
                new QueryWrapper<SchoolNewsEntity>()
        );

        return new PageUtil(page);
    }

}